package top.goldenyear.porpoise.framework.web.core.util;

import com.alibaba.ttl.TransmittableThreadLocal;

/**
 * @author airhead
 */
public class AppContextHolder {
  private static final ThreadLocal<String> APP_ID = new TransmittableThreadLocal<>();

  public static String getAppId() {
    return APP_ID.get();
  }

  public static void setAppId(String appId) {
    APP_ID.set(appId);
  }

  public static void clear() {
    APP_ID.remove();
  }
}
